package com.gxuwz.com_property.repair.service.Impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gxuwz.com_property.repair.dto.RepairDto;
import com.gxuwz.com_property.repair.mapper.RepairMapper;
import com.gxuwz.com_property.repair.pojo.Repair;
import com.gxuwz.com_property.repair.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class RepairServiceImpl implements RepairService {

    @Autowired
    private RepairMapper repairMapper;
    /**
     * 添加报修
     * */
    @Override
    public Boolean addRepairInfo(Repair repair) {
        return repairMapper.addRepairInfo(repair);
    }
    /**
     * 修改报修====== 处理报告
     * */
    @Override
    public Boolean updateRepairInfo(Repair repair) {
        return repairMapper.updateRepairInfo(repair);
    }
    /**
     * 删除报修报告
     * */
    @Override
    public Boolean delectRepairById(int id) {
        return repairMapper.delectRepairById(id);
    }
    /**
     * 查询报修报告
     * */
    @Override
    public Repair selectRepairRepair(Repair repair) {
        return repairMapper.selectRepairRepair(repair);
    }
    /**
     * 分页查询报告
     * */
    @Override
    public IPage<Repair> selectRepairByPage(Page<Repair> page, RepairDto repairDto) {
        return repairMapper.selectRepairByPage(page,repairDto);
    }

    @Override
    public List<Map<String, Object>> RepairChartMangene(){
        return repairMapper.RepairChartMangene();
    }
}
